package com.wondream.myframework.app.common.excel.context;

import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.expression.spel.standard.SpelExpressionParser;
import org.springframework.expression.spel.support.StandardEvaluationContext;

import java.util.Map;

/**
 * 上下文
 */
@NoArgsConstructor
@Data
public class CfssPoiExporterContext {

    private SpelExpressionParser spelExpressionParser;

    public static final StandardEvaluationContext EVAL_CONTEXT = new StandardEvaluationContext();

    private Map<String, Object> rootObjectMap;

    public CfssPoiExporterContext(SpelExpressionParser spelExpressionParser, Map<String, Object> rootObjectMap) {
        this.spelExpressionParser = spelExpressionParser;
        this.rootObjectMap = rootObjectMap;
        EVAL_CONTEXT.setVariables(rootObjectMap);
    }


}
